<%@page contentType="text/xml" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--
    Prova Login
-->

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xf="http://www.w3.org/2002/xforms"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <head>

        <xf:model id="login">
            <xf:instance id="state">
                <login xmlns="">
                    <username xsi:type="xsd:string"></username>
                    <password xsi:type="xsd:string"></password>
                </login>
            </xf:instance>
            <xf:bind id="nome" nodeset="/login/username" required="true()" xsi:type="xsd:string"></xf:bind>
            <xf:bind id="nome" nodeset="/login/password" required="true()" xsi:type="xsd:string"></xf:bind>
            <xf:submission action="" method="post" id="loginsubmit">
                <!--
                <xf:action ev:event="xforms-submit">
                    <xf:setvalue ref="instance('state')/trim">true</xf:setvalue>
                </xf:action>
                <xf:action ev:event="xforms-submit-done">
                    <xf:setvalue ref="instance('state')/trim">false</xf:setvalue>
                </xf:action>
                <xf:action ev:event="xforms-submit-error">
                    <xf:setvalue ref="instance('state')/trim">false</xf:setvalue>
                </xf:action>
                -->
            </xf:submission>
        </xf:model>

        <title>XForm</title>
    </head>
    <body>


        <xf:input ref="/login/username" model="login">
            <xf:label>Username</xf:label>
            <xf:alert>Il nome utente non può essere maggiore di 2</xf:alert>
        </xf:input>


        <xf:secret ref="/login/password" model="login">
            <xf:label>Password</xf:label>
        </xf:secret>


        <xf:submit submission="loginsubmit">
            <xf:label>Enter</xf:label>
        </xf:submit>


    </body>
</html>
